package de.gameduell.framework.queue {
	import de.gameduell.framework.queue.IAction;	
	
	/**
	 * @author cbra
	 */
	public class Action implements IAction{
		private var _description:String;
		private var _arguments:Array;
		private var _function:Function;
		
		public function Action(aFunction:Function,aArguments:Array,aDescription:String = "") {
			_function  = aFunction;
			_arguments = aArguments;
			_description = aDescription;
		}
		
		public function compute():void{
			_function.apply(_function,_arguments);
		}
		
		public function get description():String{
			return _description;
		}
		
		public function toString():String{
			return _description + "params: "+_arguments.toString;
		}
	}
}
